<!--
 * @Descripttion: 
 * @Author: voanit
 * @Date: 2022-09-01 16:15:05
 * @LastEditors: voanit
 * @LastEditTime: 2022-09-01 18:30:11
-->
<script setup>
import useStore from '../store'

const { todo } = useStore()
console.log(todo.newList);

</script>

<template>
  <section class="main">
    <input @change="todo.chkAll(!todo.isAll)" id="toggle-all" class="toggle-all" type="checkbox" />
    <label for="toggle-all">Mark all as complete</label>
    <ul class="todo-list">
      <li class="completed" v-for="item  in  todo.newList" :key="item.id">
        <div class="view">
          <input @change='todo.AchangeStatus(item.id)' class="toggle" type="checkbox" :checked="item.done" />
          <label>{{ item.name }}==={{ todo.isAll }}</label>
          <button class="destroy" @click="todo.AchangeDel(item.id)"></button>
        </div>
        <input class="edit" value="Create a TodoMVC template" />
      </li>
    </ul>
  </section>
</template>

<style lang="less" scoped>
</style>
